import request from '@/utils/request'

// 查询仪器档案列表
export function listInstrument(query) {
  return request({
    url: '/resource/instrument/list',
    method: 'get',
    params: query
  })
}

// 查询仪器档案详细
export function getInstrument(id) {
  return request({
    url: '/resource/instrument/' + id,
    method: 'get'
  })
}

// 新增仪器档案
export function addInstrument(data) {
  return request({
    url: '/resource/instrument',
    method: 'post',
    data: data
  })
}

// 修改仪器档案
export function updateInstrument(data) {
  return request({
    url: '/resource/instrument',
    method: 'put',
    data: data
  })
}

// 删除仪器档案
export function delInstrument(id) {
  return request({
    url: '/resource/instrument/delete/' + id,
    method: 'delete'
  })
}

export function bindUseTemplate() {
  return request({
    url: '/resource/instrument/updateInstrumentTable',
    method: 'post'
  })
}
